<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="PersonasCreateDlg" widgetVar="PersonasCreateDialog" modal="true" resizable="false" appendToBody="true" header="#{bundle.CreatePersonasTitle}">

            <h:form id="PersonasCreateForm">

                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{personasController.selected != null}">

                        <h:outputLabel value="#{bundle.CreatePersonasLabel_tipoid}" for="tipoid" />
                        <p:inputText id="tipoid" value="#{personasController.selected.tipoid}" title="#{bundle.CreatePersonasTitle_tipoid}" required="true" requiredMessage="#{bundle.CreatePersonasRequiredMessage_tipoid}"/>

                        <h:outputLabel value="#{bundle.CreatePersonasLabel_numdoc}" for="numdoc" />
                        <p:inputText id="numdoc" value="#{personasController.selected.numdoc}" title="#{bundle.CreatePersonasTitle_numdoc}" required="true" requiredMessage="#{bundle.CreatePersonasRequiredMessage_numdoc}"/>

                        <h:outputLabel value="#{bundle.CreatePersonasLabel_nombres}" for="nombres" />
                        <p:inputText id="nombres" value="#{personasController.selected.nombres}" title="#{bundle.CreatePersonasTitle_nombres}" required="true" requiredMessage="#{bundle.CreatePersonasRequiredMessage_nombres}"/>

                        <h:outputLabel value="#{bundle.CreatePersonasLabel_apellidos}" for="apellidos" />
                        <p:inputText id="apellidos" value="#{personasController.selected.apellidos}" title="#{bundle.CreatePersonasTitle_apellidos}" required="true" requiredMessage="#{bundle.CreatePersonasRequiredMessage_apellidos}"/>

                        <h:outputLabel value="#{bundle.CreatePersonasLabel_telefonoFijo}" for="telefonoFijo" />
                        <p:inputText id="telefonoFijo" value="#{personasController.selected.telefonoFijo}" title="#{bundle.CreatePersonasTitle_telefonoFijo}" required="true" requiredMessage="#{bundle.CreatePersonasRequiredMessage_telefonoFijo}"/>

                        <h:outputLabel value="#{bundle.CreatePersonasLabel_celular}" for="celular" />
                        <p:inputText id="celular" value="#{personasController.selected.celular}" title="#{bundle.CreatePersonasTitle_celular}" required="true" requiredMessage="#{bundle.CreatePersonasRequiredMessage_celular}"/>

                        <h:outputLabel value="#{bundle.CreatePersonasLabel_correo}" for="correo" />
                        <p:inputText id="correo" value="#{personasController.selected.correo}" title="#{bundle.CreatePersonasTitle_correo}" required="true" requiredMessage="#{bundle.CreatePersonasRequiredMessage_correo}"/>

                        <h:outputLabel value="#{bundle.CreatePersonasLabel_direccion}" for="direccion" />
                        <p:inputText id="direccion" value="#{personasController.selected.direccion}" title="#{bundle.CreatePersonasTitle_direccion}" required="true" requiredMessage="#{bundle.CreatePersonasRequiredMessage_direccion}"/>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{personasController.saveNew}" value="#{bundle.Save}" update="display,:PersonasListForm:datalist,:growl" oncomplete="handleSubmit(xhr,status,args,PersonasCreateDialog);"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="PersonasCreateDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
